<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>生鲜超市 - 我的订单</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }
        
        body {
            background-color: #f5f7fa;
            color: #333;
            line-height: 1.6;
        }
        
        /* 顶部快捷导航 */
        .shortcut {
            background-color: #f2f2f2;
            padding: 8px 0;
            font-size: 12px;
            border-bottom: 1px solid #e5e5e5;
        }
        
        .shortcut .wrapper {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: flex-end;
        }
        
        .shortcut ul {
            display: flex;
            list-style: none;
            gap: 15px;
        }
        
        .shortcut a {
            color: #666;
            text-decoration: none;
            transition: color 0.3s;
        }
        
        .shortcut a:hover {
            color: #e4393c;
        }
        
        /* 搜索区域 */
        .search {
            max-width: 1200px;
            margin: 20px auto;
            display: flex;
            align-items: center;
            padding: 0 15px;
            position: relative;
        }
        
        .search-icon {
            position: absolute;
            left: 30px;
            color: #999;
            font-size: 18px;
        }
        
        .search input {
            width: 100%;
            height: 50px;
            border: 2px solid #e4393c;
            border-radius: 30px;
            padding: 0 20px 0 50px;
            font-size: 16px;
            outline: none;
            transition: all 0.3s;
        }
        
        .search input:focus {
            box-shadow: 0 0 10px rgba(228, 57, 60, 0.3);
        }
        
        .search input::placeholder {
            color: #bbb;
        }
        
        .cart-wrapper {
            position: absolute;
            right: 30px;
            display: flex;
            align-items: center;
            cursor: pointer;
        }
        
        .cart-wrapper .car {
            font-size: 26px;
            color: #666;
            position: relative;
        }
        
        .cart-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            background: #e4393c;
            color: white;
            font-size: 12px;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        /* 订单区域 */
        .orders {
            max-width: 1200px;
            margin: 40px auto;
            background: white;
            border-radius: 12px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
            overflow: hidden;
            padding: 0 20px 30px;
        }
        
        .hd {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 25px 0 20px;
            border-bottom: 1px solid #eee;
            margin-bottom: 20px;
        }
        
        .hd h2 {
            font-size: 24px;
            color: #333;
            font-weight: bold;
            position: relative;
            padding-left: 15px;
        }
        
        .hd h2::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 4px;
            height: 20px;
            background: #e4393c;
            border-radius: 2px;
        }
        
        .order-filter {
            display: flex;
            gap: 15px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        
        .filter-btn {
            padding: 8px 15px;
            border: 1px solid #ddd;
            border-radius: 20px;
            background: #f8f8f8;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 14px;
        }
        
        .filter-btn.active, .filter-btn:hover {
            background: #e4393c;
            color: white;
            border-color: #e4393c;
        }
        
        /* 订单列表 */
        .order-list {
            display: flex;
            flex-direction: column;
            gap: 25px;
        }
        
        .order-item {
            border: 1px solid #eee;
            border-radius: 8px;
            overflow: hidden;
            transition: all 0.3s;
        }
        
        .order-item:hover {
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        
        .order-header {
            display: flex;
            justify-content: space-between;
            padding: 15px;
            background: #fafafa;
            border-bottom: 1px solid #eee;
        }
        
        .order-id {
            font-weight: bold;
            color: #333;
        }
        
        .order-date {
            color: #999;
            font-size: 14px;
        }
        
        .order-status {
            background: #f0f9eb;
            color: #67c23a;
            padding: 3px 10px;
            border-radius: 4px;
            font-size: 13px;
        }
        
        .order-status.shipping {
            background: #ecf5ff;
            color: #409eff;
        }
        
        .order-status.pending {
            background: #fdf6ec;
            color: #e6a23c;
        }
        
        .order-status.completed {
            background: #f0f9eb;
            color: #67c23a;
        }
        
        .order-status.received {
            background: #f0f9ff;
            color: #409eff;
        }
        
        .order-content {
            padding: 15px;
        }
        
        .product-row {
            display: flex;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid #f8f8f8;
        }
        
        .product-row:last-child {
            border-bottom: none;
        }
        
        .product-img {
            width: 80px;
            height: 80px;
            border-radius: 5px;
            overflow: hidden;
            margin-right: 15px;
            flex-shrink: 0;
        }
        
        .product-img img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .product-info {
            flex: 1;
        }
        
        .product-name {
            font-weight: bold;
            margin-bottom: 5px;
            color: #333;
        }
        
        .product-price {
            color: #e4393c;
            font-weight: bold;
        }
        
        .product-quantity {
            color: #666;
            font-size: 14px;
        }
        
        .order-footer {
            display: flex;
            justify-content: flex-end;
            padding: 15px;
            border-top: 1px solid #eee;
            background: #fafafa;
        }
        
        .order-total {
            font-size: 18px;
            font-weight: bold;
            color: #e4393c;
        }
        
        .order-total span {
            font-size: 14px;
            color: #666;
            margin-right: 10px;
        }
        
        .order-actions {
            margin-left: 20px;
        }
        
        .action-btn {
            padding: 8px 15px;
            border: 1px solid #ddd;
            border-radius: 4px;
            background: white;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 14px;
            margin-left: 10px;
        }
        
        .action-btn:hover {
            border-color: #e4393c;
            color: #e4393c;
        }
        
        .action-btn.primary {
            background: #e4393c;
            color: white;
            border-color: #e4393c;
        }
        
        .action-btn.primary:hover {
            background: #c62b2e;
        }
        
        /* 空订单提示 */
        .empty-orders {
            text-align: center;
            padding: 50px 20px;
            color: #999;
            display: none;
        }
        
        .empty-orders.show {
            display: block;
        }
        
        .empty-orders i {
            font-size: 60px;
            margin-bottom: 20px;
            color: #e0e0e0;
        }
        
        .empty-orders p {
            margin-bottom: 20px;
            font-size: 16px;
        }
        
        .empty-btn {
            display: inline-block;
            padding: 10px 30px;
            background: #e4393c;
            color: white;
            border-radius: 30px;
            text-decoration: none;
            font-size: 16px;
            transition: all 0.3s;
        }
        
        .empty-btn:hover {
            background: #c62b2e;
        }
        
        /* 响应式调整 */
        @media (max-width: 768px) {
            .order-header {
                flex-wrap: wrap;
                gap: 10px;
            }
            
            .order-footer {
                flex-direction: column;
                gap: 15px;
                align-items: flex-end;
            }
            
            .order-actions {
                margin-left: 0;
                display: flex;
                gap: 10px;
            }
            
            .action-btn {
                margin-left: 0;
            }
            
            .product-row {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .product-img {
                margin-bottom: 10px;
            }
            
            .order-filter {
                gap: 8px;
            }
            
            .filter-btn {
                padding: 6px 12px;
            }
        }
    </style>
</head>
<body>
    <div class="shortcut">
        <div class="wrapper">
            <ul>
                <li><a href="主页.html"><i class="fas fa-file-alt"></i> 返回主页</a></li>
                <li><a href="注册.html"><i class="fas fa-file-alt"></i> 注册新用户</a></li>
            </ul>
        </div>
    </div>
    
    <div class="search">
        <div class="iconfont icon-fangdajing search-icon"><i class="fas fa-search"></i></div>
        <input type="text" placeholder="搜一搜 马俊 23215220125">
    </div>
    
    <!-- 订单区域 -->
    <div class="orders">
        <div class="hd">
            <h2>我的订单</h2>
        </div>
        
        <div class="order-filter">
            <div class="filter-btn active" data-filter="all">全部订单</div>
            <div class="filter-btn" data-filter="pending">待付款</div>
            <div class="filter-btn" data-filter="shipping">待发货</div>
            <div class="filter-btn" data-filter="received">待收货</div>
            <div class="filter-btn" data-filter="completed">已完成</div>
        </div>
        
        <div class="order-list">
            <!-- 订单1 -->
            <div class="order-item" data-status="shipping">
                <div class="order-header">
                    <div>
                        <span class="order-id">订单号: DD20230611001</span>
                        <span class="order-date">2023-06-11 09:25:34</span>
                    </div>
                    <div class="order-status shipping">待发货</div>
                </div>
                
                <div class="order-content">
                    <div class="product-row">
                        <div class="product-img">
                            <img src="image/fresh_goods_1.jpg" alt="美威 智利原味三文鱼排">
                        </div>
                        <div class="product-info">
                            <div class="product-name">美威 智利原味三文鱼排 240g/袋 4片装</div>
                            <div class="product-price">￥59.00</div>
                            <div class="product-quantity">数量: 1</div>
                        </div>
                    </div>
                    
                    <div class="product-row">
                        <div class="product-img">
                            <img src="image/fresh_goods_5.jpg" alt="越南白心火龙果">
                        </div>
                        <div class="product-info">
                            <div class="product-name">越南白心火龙果4个装 标准果400-550g</div>
                            <div class="product-price">￥20.00</div>
                            <div class="product-quantity">数量: 2</div>
                        </div>
                    </div>
                </div>
                
                <div class="order-footer">
                    <div class="order-total">
                        <span>合计:</span>￥99.00
                    </div>
                    <div class="order-actions">
                        <button class="action-btn">订单详情</button>
                        <button class="action-btn primary">提醒发货</button>
                    </div>
                </div>
            </div>
            
            <!-- 订单2 -->
            <div class="order-item" data-status="completed">
                <div class="order-header">
                    <div>
                        <span class="order-id">订单号: DD20230610002</span>
                        <span class="order-date">2023-06-10 14:12:08</span>
                    </div>
                    <div class="order-status completed">已完成</div>
                </div>
                
                <div class="order-content">
                    <div class="product-row">
                        <div class="product-img">
                            <img src="image/fresh_goods_2.jpg" alt="红功夫 麻辣小龙虾">
                        </div>
                        <div class="product-info">
                            <div class="product-name">红功夫 麻辣小龙虾1.5kg 4-6钱/25-32只</div>
                            <div class="product-price">￥79.00</div>
                            <div class="product-quantity">数量: 1</div>
                        </div>
                    </div>
                    
                    <div class="product-row">
                        <div class="product-img">
                            <img src="image/fresh_goods_6.jpg" alt="广西沃柑">
                        </div>
                        <div class="product-info">
                            <div class="product-name">广西沃柑 新鲜水果柑橘1.5kg</div>
                            <div class="product-price">￥20.00</div>
                            <div class="product-quantity">数量: 1</div>
                        </div>
                    </div>
                </div>
                
                <div class="order-footer">
                    <div class="order-total">
                        <span>合计:</span>￥99.00
                    </div>
                    <div class="order-actions">
                        <button class="action-btn">订单详情</button>
                        <button class="action-btn primary">再次购买</button>
                    </div>
                </div>
            </div>
            
            <!-- 订单3 -->
            <div class="order-item" data-status="pending">
                <div class="order-header">
                    <div>
                        <span class="order-id">订单号: DD20230609003</span>
                        <span class="order-date">2023-06-09 17:45:22</span>
                    </div>
                    <div class="order-status pending">待付款</div>
                </div>
                
                <div class="order-content">
                    <div class="product-row">
                        <div class="product-img">
                            <img src="image/fresh_goods_7.jpg" alt="进口牛油果">
                        </div>
                        <div class="product-info">
                            <div class="product-name">进口 牛油果 6个装 单果重约130-180g</div>
                            <div class="product-price">￥50.00</div>
                            <div class="product-quantity">数量: 1</div>
                        </div>
                    </div>
                </div>
                
                <div class="order-footer">
                    <div class="order-total">
                        <span>合计:</span>￥50.00
                    </div>
                    <div class="order-actions">
                        <button class="action-btn">取消订单</button>
                        <button class="action-btn primary">立即支付</button>
                    </div>
                </div>
            </div>
            
            <!-- 订单4 -->
            <div class="order-item" data-status="received">
                <div class="order-header">
                    <div>
                        <span class="order-id">订单号: DD20230608004</span>
                        <span class="order-date">2023-06-08 10:15:30</span>
                    </div>
                    <div class="order-status received">待收货</div>
                </div>
                
                <div class="order-content">
                    <div class="product-row">
                        <div class="product-img">
                            <img src="image/fresh_goods_3.jpg" alt="黄花鱼">
                        </div>
                        <div class="product-info">
                            <div class="product-name">三都港 冷冻无公害黄花鱼 700g 2条 袋装</div>
                            <div class="product-price">￥88.00</div>
                            <div class="product-quantity">数量: 1</div>
                        </div>
                    </div>
                    
                    <div class="product-row">
                        <div class="product-img">
                            <img src="image/fresh_goods_4.jpg" alt="即食海参">
                        </div>
                        <div class="product-info">
                            <div class="product-name">渔公码头 大连鲜食入味即食海参</div>
                            <div class="product-price">￥65.00</div>
                            <div class="product-quantity">数量: 1</div>
                        </div>
                    </div>
                </div>
                
                <div class="order-footer">
                    <div class="order-total">
                        <span>合计:</span>￥153.00
                    </div>
                    <div class="order-actions">
                        <button class="action-btn">订单详情</button>
                        <button class="action-btn primary">确认收货</button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 空订单提示 -->
        <div class="empty-orders" id="empty-orders">
            <i class="fas fa-box-open"></i>
            <p>当前没有符合条件的订单</p>
            <a href="#" class="empty-btn">去逛逛</a>
        </div>
    </div>
    
    <script>
        // 订单筛选功能
        document.querySelectorAll('.filter-btn').forEach(btn => {
            btn.addEventListener('click', function() {
                // 移除所有按钮的active状态
                document.querySelectorAll('.filter-btn').forEach(b => {
                    b.classList.remove('active');
                });
                
                // 为当前点击的按钮添加active状态
                this.classList.add('active');
                
                // 获取筛选条件
                const filter = this.getAttribute('data-filter');
                
                // 筛选订单
                filterOrders(filter);
            });
        });
        
        // 筛选订单函数
        function filterOrders(filter) {
            const orderItems = document.querySelectorAll('.order-item');
            const emptyOrders = document.getElementById('empty-orders');
            let visibleCount = 0;
            
            orderItems.forEach(item => {
                const status = item.getAttribute('data-status');
                
                if (filter === 'all' || filter === status) {
                    item.style.display = 'block';
                    visibleCount++;
                } else {
                    item.style.display = 'none';
                }
            });
            
            // 显示/隐藏空订单提示
            if (visibleCount > 0) {
                emptyOrders.classList.remove('show');
            } else {
                emptyOrders.classList.add('show');
            }
        }
        
        // 页面加载时默认显示全部订单
        window.addEventListener('DOMContentLoaded', () => {
            filterOrders('all');
        });
    </script>
</body>
</html>
